home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume90 / aplictns / dtc / part01 next >
Encoding:
Internet Message Format  |  1990-03-14  |  42.4 KB

  1. Path: xanth!cs.odu.edu!Amiga-Request
  2. From: Amiga-Request@cs.odu.edu (Amiga Sources/Binaries Moderator)
  3. Newsgroups: comp.sources.amiga
  4. Subject: v90i107: DTC - desktop calendar, Part01/06
  5. Message-ID: <11786@xanth.cs.odu.edu>
  6. Date: 14 Mar 90 01:29:42 GMT
  7. Sender: tadguy@cs.odu.edu
  8. Reply-To: "Glenn Everhart: 215 354 7610 (8*747 7610)" <EVERHART@ARISIA.dnet.ge.com>
  9. Lines: 1503
  10. Approved: tadguy@cs.odu.edu (Tad Guy)
  11. X-Mail-Submissions-To: Amiga@cs.odu.edu
  12. X-Post-Discussions-To: comp.sys.amiga
  13.  
  14. Submitted-by: "Glenn Everhart: 215 354 7610 (8*747 7610)" <EVERHART@ARISIA.dnet.ge.com>
  15. Posting-number: Volume 90, Issue 107
  16. Archive-name: applications/dtc/part01
  17.  
  18. [ the two main source modules, Dtc.For and Dtc2.For have been split to
  19.   to allow for posting.  remember to join them before compiling.  ...tad ]
  20.  
  21. DTC is a utility providing a simple calendar on your desk which can
  22. hold and show appointments and be useful in managing your time.
  23.     Its chief goals were to provide Day, Week, and Month at a
  24. glance for any date between 1/1/0001 and 12/31/9999, defaulting to
  25. the current system date. It is menu driven and fairly easy to use.
  26.  
  27. #!/bin/sh
  28. # This is a shell archive.  Remove anything before this line, then unpack
  29. # it by saving it into a file and typing "sh file".  To overwrite existing
  30. # files, type "sh file -c".  You can also feed this as standard input via
  31. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  32. # will see the following message at the end:
  33. #        "End of archive 1 (of 6)."
  34. # Contents:  DTC.DAT DTC.Man DefCentry.Inc Dtc2.For.ac appdtc.inc
  35. #   apptdtc.inc comdtc.inc comdtcd.inc dtc.hlp dtcmak.cmd dtcrelnt.txt
  36. #   dtcxidate.inc escdtc.inc escdtcd.inc stmtfunc.for stmtfuncsp.for
  37. # Wrapped by tadguy@xanth on Tue Mar 13 20:29:20 1990
  38. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  39. if test -f 'DTC.DAT' -a "${1}" != "-c" ; then 
  40.   echo shar: Will not clobber existing file \"'DTC.DAT'\"
  41. else
  42. echo shar: Extracting \"'DTC.DAT'\" \(371 characters\)
  43. sed "s/^X//" >'DTC.DAT' <<'END_OF_FILE'
  44. X19860911160 test a                                                                              
  45. X19860912160 test b 4pm                                                                          
  46. X19860911123 lunchtime appt                                                                      
  47. X19860911170 X
  48. X19881231120 Lunchtime
  49. X19881231163 Gail, Craig, + Linda arrive
  50. END_OF_FILE
  51. if test 371 -ne `wc -c <'DTC.DAT'`; then
  52.     echo shar: \"'DTC.DAT'\" unpacked with wrong size!
  53. fi
  54. # end of 'DTC.DAT'
  55. fi
  56. if test -f 'DTC.Man' -a "${1}" != "-c" ; then 
  57.   echo shar: Will not clobber existing file \"'DTC.Man'\"
  58. else
  59. echo shar: Extracting \"'DTC.Man'\" \(4531 characters\)
  60. sed "s/^X//" >'DTC.Man' <<'END_OF_FILE'
  61. XDesk Top Calendar (DTC)
  62. X
  63. XDTC is a utility providing a simple calendar on your desk which can
  64. Xhold and show appointments and be useful in managing your time.
  65. X    Its chief goals were to provide Day, Week, and Month at a
  66. Xglance for any date between 1/1/0001 and 12/31/9999, defaulting to
  67. Xthe current system date. It is menu driven and fairly easy to use.
  68. X
  69. X    Installation:
  70. X    1. Move the DTC.HLP file to directory C: so the online H
  71. Xcommand can find it.
  72. X    2. Move the DTC file where it can be run. (You may have to
  73. Xenlarge the stack with a STACK command for DTC to work; it is
  74. Xwritten in Fortran and the Absoft compiler seems to have that
  75. Xproperty. If in doubt try STACK 50000.) (I believe that the default
  76. Xstack will work OK normally).
  77. X
  78. X    3. Type DTC to fire it up. The Q command returns to AmigaDOS.
  79. X
  80. X    Use:
  81. X
  82. X    DTC fires up a CON: window which will generally fill the whole
  83. Xscreen or the top halfscreen if in high res mode. Commands are entered
  84. Xfrom the keyboard; a menu is initially displayed.
  85. X    DTC2 uses the current window and just uses whatever of it is
  86. Xneeded; it needs more or less an 80 by 24 area. Other than this DTC
  87. Xand DTC2 work much alike. However, DTC2 probably will not be interfered
  88. Xwith by ConMan 1.3.
  89. X
  90. X    Commands include:
  91. X
  92. X    I  Initialize date to current system date. Sometimes needed
  93. X        to avoid major brain damage in date used.
  94. X    D Date Time Appt - Enters Appt (up to 60 chars) in date and time
  95. X        given. Just about any normally used date and time format
  96. X        will be accepted. Years can be 2 or 4 digits; in the former
  97. X        case the 20th century is assumed. Just giving the D command
  98. X        (or just D date) displays the Day's appointments. Note that
  99. X        E is a pseudo time meaning Evening (5PM or later). You can
  100. X        use 12 or 24 hour time; DTC understands both. It assumes
  101. X        appointments are in the prime shift, however.
  102. X    W date - Displays times for appointments for the week containing
  103. X        date.
  104. X    M date - Displays days with appointments for the month specified.
  105. XNote: a Year command exists but messes up unless display can handle 132
  106. Xcolumns; the Amiga can't so don't use it...
  107. X    S date time appt - Schedule appt in all files indirectly pointed
  108. X        at. Appointments are normally stored in file DTC.DAT preceded
  109. X        by YYYYMMDDHHH. If the YYYYMMMDDHHH is 999999999999, DTC
  110. X        will assume the rest of the line is a filename (ending in =
  111. X        generally) and will look there also during appointment
  112. X        scans. Where the L or NW commands are used to set up a
  113. X        meeting, a file might be used with pointers like this to
  114. X        a large group of people. The S command is provided to
  115. X        let you put meeting notices in the INDIRECTED files
  116. X        instead of just in the TOP LEVEL file like the D command.
  117. X    F filename - Changes the DTC appointment file to filename. Any
  118. X        filename the system can understand is OK with DTC.
  119. X    L date nn - Locates periods of nn half-hours that are free in
  120. X        the week containing date. These are times when a meeting
  121. X        of length nn/2 hours could start that week.
  122. X    NW, ND  - Show free times during week or day. Reverses display sense
  123. X        for busy/free. Handy if you have a BUSY schedule.
  124. X    P date - Purge appointments, destroying any older than date.
  125. X    X date1 time1 date2 time2 - eXchange appointment from date1, time1
  126. X        to date2 time2.
  127. X    U date time - Unschedule appointment at date, time.
  128. X    Q - Quit DTC. Exit the program.
  129. X        Times of form HH:MM>hh:mm (e.g. 12:00>15:00) express time
  130. X        ranges and fill in blocks of time if so desired.
  131. X        The program attempts to display the current time/date
  132. X        in reverse video or similar renditions where possible and
  133. X        to show default dates by underlining.
  134. X    +nD
  135. X    +nW
  136. X    +nM
  137. X    +nY    Move default display forward by n Days, Weeks, Months, or
  138. X        Years. N defaults to 1 and the unit defaults to the last
  139. X        displayed one.
  140. X    -nD
  141. X    -nW
  142. X    -nM
  143. X    -nY    Ditto, back n days, weeks, months, or years.
  144. X
  145. X    H - displays DTC.HLP on screen. Not a very powerful help system
  146. X        but simple to use.
  147. X
  148. X    This version of DTC comes from work done by Mitch Wyle, Glenn
  149. X    Everhart, and Charles Garman for PDP11 and VAX versions. The
  150. X    VAX VMS version was ported to Amiga by Glenn Everhart (mainly
  151. X    in preparation for porting a spreadsheet, to learn the compiler's
  152. X    idiosyncracies). Complete sources are presented. While it is not
  153. X    as polished as it could be, it seems to be fully functional (at
  154. X    least on my Amiga in 512K under 1.2 beta 6) and serves a purpose
  155. X    nothing else I have seen serves. Enjoy. If anyone improves this
  156. X    version, please forward me a copy.
  157. X
  158. X    DTC also works OK under AmigaDos 1.3.
  159. X        Glenn Everhart
  160. X        25 Sleigh Ride Rd.
  161. X        Glen Mills, Pa 19342
  162. END_OF_FILE
  163. if test 4531 -ne `wc -c <'DTC.Man'`; then
  164.     echo shar: \"'DTC.Man'\" unpacked with wrong size!
  165. fi
  166. # end of 'DTC.Man'
  167. fi
  168. if test -f 'DefCentry.Inc' -a "${1}" != "-c" ; then 
  169.   echo shar: Will not clobber existing file \"'DefCentry.Inc'\"
  170. else
  171. echo shar: Extracting \"'DefCentry.Inc'\" \(131 characters\)
  172. sed "s/^X//" >'DefCentry.Inc' <<'END_OF_FILE'
  173. X      integer*4 icentry
  174. X      parameter (icntry = 1900)
  175. XC       Default century
  176. XC -h- dtcxidate.inc       Tue Jul  8 16:16:24 1986
  177. END_OF_FILE
  178. if test 131 -ne `wc -c <'DefCentry.Inc'`; then
  179.     echo shar: \"'DefCentry.Inc'\" unpacked with wrong size!
  180. fi
  181. # end of 'DefCentry.Inc'
  182. fi
  183. if test -f 'Dtc2.For.ac' -a "${1}" != "-c" ; then 
  184.   echo shar: Will not clobber existing file \"'Dtc2.For.ac'\"
  185. else
  186. echo shar: Extracting \"'Dtc2.For.ac'\" \(21276 characters\)
  187. sed "s/^X//" >'Dtc2.For.ac' <<'END_OF_FILE'
  188. X          end if
  189. XC (unlike Schlitz, we can go around twice)
  190. X
  191. X          if (idisp .ne. idspp) then
  192. XC other than purge
  193. Xc ***           itx2 = 175
  194. XC Set default for '*' or <null>
  195. X        call dtctimcvt(itx1, itx2)
  196. X        if (itx1 .eq. itx2)
  197. X     1      itx2 = itx2 + 1
  198. XC Add (10 mins) to allow semi-open interval
  199. X        if (first) then
  200. X            it1 = itx1
  201. X            it2 = itx2
  202. X            if (idisp .eq. idspx) then
  203. X                if (ln1 .eq. 0) go to 999
  204. XC Error if nothing left
  205. X                first = .false.
  206. X                go to 10
  207. XC Re-cycle code
  208. X            end if
  209. XC Done unless X
  210. X        end if
  211. X          else
  212. XC P, guarantee no redisplay
  213. X        ln1 = 0
  214. XC Zap the line
  215. X          end if
  216. XC Done parse for U, X
  217. X      end if
  218. XC Done date/time parse
  219. X
  220. X      ixhash = ihymd(iye, im, id)
  221. XC Calc hash for day of interest
  222. X
  223. Xc ***   type 950, ixhash
  224. Xc *** 950       format(2z9.8)
  225. X
  226. X      if (idisp .eq. idspp)
  227. X     1 then
  228. XC Set request date for RDAPPT
  229. X          irqhash(1) = ixhash
  230. XC Delete before
  231. X        else
  232. X          irqhash(1) = 0
  233. XC Look at everybody
  234. X      end if
  235. X
  236. X      irqhash(2) = Z'7FFFFFFF'
  237. XC 'Til the end of time
  238. X
  239. X      firstflg = 0
  240. XC Zero until file opened for write
  241. X
  242. X      prveof = 0
  243. X      eofflg = -1
  244. X
  245. X      do while (prveof .ge. 0)
  246. X
  247. X          call dtcrdappt(eofflg, 1)
  248. XC Look at control entries
  249. X
  250. X          if (eofflg .gt. 0)
  251. X     1     then
  252. X        eofflg = 0
  253. XC Don't open it on return
  254. X        go to 190
  255. XC but re-write it as is
  256. X
  257. XC Test it now
  258. X          else if (eofflg .eq. 0)
  259. X     1     then
  260. X
  261. Xc ***   type 950, irchash
  262. X
  263. X        iht = min0(max0(iht, 80), 173)
  264. XC Insure a kosher time value
  265. X
  266. X        go to (110, 120, 130) idisp
  267. XC Dispatch on numeric value
  268. X        go to 190
  269. XC Bad call, re-write anyway?
  270. X
  271. X 120            if ((irchash .eq. ixhash) .and.
  272. X     1      ((iht .ge. it1) .and. (iht .lt. it2)))
  273. X     2      go to 100
  274. XC Criteria for Unscheduling (deleting)
  275. X        go to 190
  276. XC Do re-write
  277. X
  278. X 130            if ((irchash .eq. ixhash) .and.
  279. X     1      ((iht .ge. it1) .and. (iht .lt. it2)))
  280. X     2    then
  281. X
  282. X            iht = itx1 + (iht - it1)
  283. XC Get updated time
  284. X            if (mod(iht, 10) .eq. 6) iht = iht + 4
  285. XC go to next hour
  286. X
  287. X            if (iht .gt. itx2) go to 100
  288. XC Duration was shortened
  289. X
  290. X            ihy = ibigyr
  291. XC Change dates
  292. X            ihm = idmo
  293. X            ihd = iddy
  294. X
  295. X        end if
  296. XC Usually re-write
  297. Xc
  298. X 110            continue
  299. XC Purge, re-write
  300. X
  301. XC Can't open output till
  302. X 190            if (firstflg .eq. 0)
  303. X     1    then
  304. XC we have input
  305. XC
  306. X
  307. X            close(3)
  308. Xc            open(unit=3, file=FNc(1:fnsz), status='NEW',
  309. Xc     1          form='FORMATTED',
  310. Xc     1          err=999)
  311. X9991    continue
  312. X            open(unit=3, file='DTC.TMP', status='NEW',
  313. X     1          form='FORMATTED',
  314. X     1          err=999)
  315. X      iopn2=1
  316. Xc flag we got DTC.TMP open...
  317. X            firstflg = 1
  318. XC Output now open
  319. X
  320. X        end if
  321. X
  322. X        write (3, 201,err=9991) ihy, ihm, ihd, iht,
  323. X     1          apptstr(1:min0(max0(iaptln, 1), iaptlim))
  324. Xc ***   1         (appoin(k), k=1, min0(max0(iaptln, 1), iaptlim))
  325. X 201            format(i4.4, 2i2.2, i3.3, x, a)
  326. XC New format, 19850806113
  327. X
  328. X          end if
  329. XC eofflg
  330. X
  331. X 100        prveof = eofflg
  332. XC Set loop condition
  333. X
  334. X      end do
  335. XC while
  336. X
  337. XC Purged everything?
  338. X      if (firstflg .eq. 0)
  339. X     1 then
  340. XC create empty file
  341. X
  342. X          close(3)
  343. Xc          open(unit=3, file=FNc(1:fnsz), status='NEW',
  344. Xc     1  form='FORMATTED',
  345. Xc     1  err=999)
  346. X          open(unit=3, file='DTC.TMP', status='NEW',
  347. X     1  form='FORMATTED',
  348. X     1  err=999)
  349. X          iopn2=1
  350. X          firstflg = 1
  351. XC Output now open
  352. X
  353. X       end if
  354. X
  355. X    if(iopn2.le.0)goto 9403
  356. Xc Amiga ...
  357. Xc rewind 1 and 2, then copy DTC.TMP into DTC.DAT (or wherever)
  358. Xc    Rewind 1
  359. X        close(1)
  360. X        close(4)
  361. X        open(unit=4, file=FNc(1:fnsz), status='NEW',
  362. X     1  form='FORMATTED',err=999)
  363. Xc re-open unit 4 if we can, for write...
  364. Xc    Rewind 3
  365. X          close(3)
  366. X          open(unit=3, file='DTC.TMP', status='old',
  367. X     1  form='FORMATTED',
  368. X     1  err=999)
  369. X
  370. X9402    continue
  371. X    Read (3,201,end=9401,err=9401) ihy,ihm,ihd,iht,apptstr
  372. Xc read temp file, write back new appt file
  373. X        write (4, 201,err=9401) ihy, ihm, ihd, iht, apptstr
  374. Xc 201            format(i4.4, 2i2.2, i3.3, x, a)
  375. X    goto 9402
  376. X9401    continue
  377. X    close(3,Status='delete')
  378. X        close(4)
  379. X        firstflg=0
  380. X        iopn2=0
  381. X9403    continue
  382. X        close(3)
  383. X        close(2)
  384. X        close(4)
  385. X        close(1)
  386. XC Done with new files
  387. X
  388. X        return
  389. X
  390. X 999    write (*, 990)
  391. XC Error on decode, write nastygram
  392. X 990    format($,'Syntax or file-open (write) error.', $)
  393. X       ln1 = 0
  394. XC Inhibit rescan
  395. Xc
  396. X      end
  397. XC -h- dtcdatcvt.for       Tue Jul  8 16:07:21 1986
  398. Xc Date conversion function (part of DTC), derived from DATMUN,
  399. Xc except decodes the values directly into DEFDAT and shrinks LINE,
  400. Xc rather than schlep LINE back and forth to kingdom come.
  401. XC Modified 850422, CG, to restrict values of month/day/year
  402. XC modified 850325, 850726 & 850731, CG, to allow any of the following:
  403. Xc       d{d}/m{m}/{y}y, d, dd, dmm, ddmm, dmmyy, ddmmyy, dmmyyyy, ddmmyyyy
  404. Xc                                                       for D or W functions
  405. Xc       m{m}/{y}y, m, mm, myy, mmyy, mmyyyy, myyyy      for M
  406. Xc       y, yy, yyy, yyyy                                for Y
  407. XC plus dd-mon-yy, dd-mm-yy, dd-xii-yy formats
  408. XC function:
  409. Xc  Convert a line starting with a date of form
  410. Xc       mmddyy OR mm/dd/yy OR dd-mon-yy OR dd-romn-yy
  411. Xc  to binary equivalents, and remove from line, copying binary values
  412. Xc  to DEFDAT in common.
  413. XC  Leaves whatever follows the date alone.
  414. Xc  Added for DTC to not have to use such a crock date
  415. Xc  format as the original; too hard to use otherwise.
  416. X
  417. X      Subroutine dtcdatcvt (nf)
  418. XC (line,nf)
  419. Xc
  420. Xc      implicit none
  421. Xc
  422. X      Integer*4  nf
  423. XC Number of fields expected
  424. Xc
  425. X      include comdtc.INC
  426. Xc
  427. X      INTEGER*1 nb, l1, l2, l3, l4, lxx(4), work(icmln), tb6(6)
  428. XC,
  429. Xc
  430. XC lengths of months (30 days hath Sept ...)
  431. X      Integer*4 lm(12)
  432. Xc
  433. XC Min chars to recognize month names
  434. X      Integer*4 minln(12)
  435. X
  436. XC Decode month names, or European style w/ Roman months
  437. X      character*4 rch,mab(12),rom(12)
  438. X
  439. X      Integer*4 i, k, kkk, n, nn, ix, ixyr, ixmo, ixdy, nfd,
  440. X     1  ifnb, lnb, lcount
  441. X
  442. X      logical longyr
  443. XC If year entered as 3 chars or more
  444. X
  445. X      integer*2 iwk(42), lw1
  446. X      integer*1 iwkk(84),ln1
  447. X      Character*1 ln1c
  448. X      Equivalence (work,iwkk)
  449. XC 2 chars at a time
  450. Xc
  451. X      Integer*4  ll1
  452. X
  453. X      equivalence(line(1),ln1)
  454. X      equivalence (ln1,lw1),(ll1,rch)
  455. X      equivalence (rch, lxx), (work, iwk)
  456. X      equivalence(line(1),ln1c)
  457. Xc
  458. X      Integer*4 icvt10, icur
  459. X      INTEGER*1 ich
  460. X      include stmtfuncsp.for
  461. X      include comdtcd.inc
  462. X
  463. X      Data lm
  464. X     1 /31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31/
  465. Xc
  466. XC Min chars to recognize month names
  467. X       Data minln
  468. X     1 /2, 1, 3, 2, 3, 3, 3, 2, 1, 1, 1, 1/
  469. X
  470. XC Decode month names, or European style w/ Roman months
  471. X      Data
  472. X     1 mab / 'JANU', 'FEBR', 'MARC', 'APRI', 'MAY ', 'JUNE',
  473. X     2      'JULY', 'AUGU', 'SEPT', 'OCTO', 'NOVE', 'DECE'/,
  474. X     3 rom / 'I   ', 'II  ', 'III ', 'IV  ', 'V   ', 'VI  ',
  475. X     4      'VII ', 'VIII', 'IX  ', 'X   ', 'XI  ', 'XII '/
  476. X
  477. X       include stmtfunc.for
  478. X      icvt10(icur, ich) = (icur * 10) + icvtbn1(ich)
  479. XC conversion function stage
  480. X
  481. Xc Begin code
  482. X
  483. X      longyr = .false.
  484. XC set default of century calculation
  485. X
  486. Xc Initialize default values for omitted fields
  487. X
  488. X      ixyr = ibigyr
  489. XC Copy current values
  490. X      ixmo = idmo
  491. XC from common
  492. X      ixdy = iddy
  493. X      if (numeric(ln1)) then
  494. XC Dates must start with number
  495. X
  496. X          work(1) = ln1
  497. XC Copy first character
  498. X          ix = icvtbn1(ln1)
  499. XC Compute value on the fly
  500. Xc
  501. X          do (n = 2, (nf * 2) + 2)
  502. XC Allow [mm][dd][yyyy]
  503. Xc
  504. X        l1 = line(n)
  505. XC Copy current character
  506. X
  507. XC Field separators: slash
  508. X        if (l1 .eq. ichar('/'))
  509. X     1      go to 100
  510. XC for mm/dd/yy form
  511. X
  512. XC .. dash
  513. X        if (l1 .eq. ichar('-'))
  514. X     1      go to 200
  515. XC for dd-mmm-yy form
  516. X
  517. X        if ((l1 .eq. ichar(':')) .or. (l1 .eq.ichar('>')))
  518. X     1      go to 999
  519. XC hour-string first, return default values
  520. XC anything else:
  521. X        if (.not. numeric(l1))
  522. X     1      go to 300    
  523. XC mmddyy, minus some characters, fake whatever is required
  524. X
  525. X        work(n) = l1
  526. XC Don't recopy
  527. X        ix = icvt10(ix, l1)
  528. XC continue conversion
  529. X
  530. X          end do
  531. X
  532. X          n = (nf * 2) + 3
  533. XC Set shrink value if no delimiter
  534. X
  535. X          go to 300
  536. XC Go convert it
  537. X
  538. X      else if ((ln1c .eq. '+') .or. (ln1c .eq. '-')) then
  539. X          k = incmod
  540. XC Save current value
  541. X          call dtcdatinc
  542. XC Convert incremental date
  543. X          incmod = k
  544. XC Restore
  545. X      else if (ln1c .eq. '=') then
  546. X          kkk = 1
  547. XC Place holder, strip only, date n/c
  548. X          go to 950
  549. X      end if
  550. XC (don't want to reformat whole file)
  551. X
  552. X      go to 999
  553. XC All done here
  554. X
  555. Xc handle mm/dd or mm/dd/yy{yy} (for D, W, M or Y)
  556. Xc or mm/yy{yy} (for M or Y)
  557. X
  558. X 100    continue
  559. XC Here for '/' encountered in first scan loop
  560. X
  561. X      k = n + 1
  562. XC next character to look at
  563. X      l1 = line(k)
  564. X      if (.not. numeric(l1)) go to 300
  565. XC nnnn/x ???
  566. X
  567. X      ixmo = ix
  568. XC First field is always month in "/" notation
  569. X
  570. X      ix = icvtbn1(l1)
  571. XC Start 2nd conversion
  572. X
  573. X      do (n = k + 1, 20)
  574. XC should be plenty
  575. X
  576. X          l1 = line(n)
  577. XC get character
  578. X          if (l1 .eq. ichar('/')) go to 110
  579. XC Found second /
  580. X          if (.not. numeric(l1)) go to 120
  581. XC End of scan
  582. X          ix = icvt10(ix, l1)
  583. XC convert
  584. X
  585. X      end do
  586. X
  587. X      n = 21
  588. XC Set it
  589. X
  590. X 120    if (nf .eq. 3) then
  591. X          ixdy = ix
  592. XC 2nd field is day
  593. X      else
  594. X          ixyr = ix
  595. XC .. year
  596. X          longyr = ((n - k) .gt. 2)
  597. X      end if
  598. X
  599. X      go to 900
  600. X
  601. X 110    l1 = line(n+1)
  602. XC Found 2nd slash, check for third field
  603. X      if (.not. numeric(l1)) go to 120
  604. XC left field
  605. XC
  606. X
  607. X      k = n + 1
  608. X
  609. X      ixdy = ix
  610. XC 2nd has to be day
  611. X
  612. X      ixyr = icvtbn1(l1)
  613. XC Start 3rd conversion (year)
  614. X
  615. X      do (n = k + 1, 20)
  616. XC get more numerics
  617. X
  618. X          l1 = line(n)
  619. X          if (.not. numeric(l1)) go to 910
  620. X          ixyr = icvt10(ixyr, l1)
  621. X
  622. X      end do
  623. X
  624. X      n = 21
  625. XC mark next character
  626. X
  627. X      go to 910
  628. XC set for SHRINK
  629. X
  630. Xc handle dd-mon-yy, dd-mm-yy, or dd-roman-yy
  631. X
  632. X 200    continue
  633. XC Here for '-' in first scan loop
  634. X
  635. X      ixdy = ix
  636. XC Copy converted day field
  637. X
  638. X      rch = '    '
  639. XC initialize for alpha month name, or Roman numerals
  640. X
  641. X      k = n + 1
  642. XC next char after "-"
  643. X
  644. X      l1 = line(k)
  645. X
  646. X      if (numeric(l1)) then
  647. XC European format dd-mm-yy
  648. X
  649. X          ixmo = icvtbn1(l1)
  650. XC go for it directly
  651. X
  652. X          do (n = k + 1, 20)
  653. X
  654. X        l1 = line(n)
  655. X
  656. X        if (.not. numeric(l1)) go to 210
  657. X
  658. X        ixmo = icvt10(ixmo, l1)
  659. X
  660. X          end do
  661. X
  662. X          n = 21
  663. X
  664. X      else if (alpha(l1)) then
  665. X
  666. X          lxx(1) = l1 .and. z'5F5f5f5f'
  667. XC Set first char for name or roman
  668. X
  669. X          lcount = 1
  670. X
  671. X          do (nn = k + 1, k + 6)
  672. XC should find "-" by then
  673. X
  674. X        l1 = line(nn)
  675. X        if (l1 .eq. ichar('-')) go to 230
  676. XC Start search
  677. X        if (.not. alpha(l1)) go to 230
  678. XC also terminate
  679. X        if (lcount .lt. 4) then
  680. XC room for at least one more
  681. X            lcount = lcount + 1
  682. X            lxx(lcount) = l1 .and. z'5F5f5f5f'
  683. XC Copy character
  684. X        end if
  685. X          end do
  686. X
  687. X          nn = k + 6
  688. X
  689. X 230        continue
  690. X
  691. X          do (i = 1, 12)
  692. XC Loop over months
  693. X        if (rch .eq. rom(i)) go to 250
  694. XC Found match in roman set
  695. X        if (lcount .ge. minln(i)) then
  696. X            if (rch(1:lcount) .eq. mab(i)(1:lcount))
  697. X     1          go to 250
  698. XC Found match in alpha names
  699. X        end if
  700. X
  701. XC Note: last two IF statements above replace original horrendous sequence of
  702. Xc IF-THEN-ELSEs to see if month was J then A, or F, or M then A then R, etc
  703. XC
  704. X         end do
  705. X
  706. Xc Fell out of loop, leave current month
  707. X
  708. X          go to 300
  709. XC Unknown month or roman seq, back up before "-"
  710. X
  711. X 250        ixmo = i
  712. XC iwk(1) = icvtbcd(i)
  713. X          n = nn
  714. XC Accept characters
  715. X
  716. X      else
  717. XC "-" followed by non alphanumeric
  718. X          go to 300
  719. X      end if
  720. X
  721. X 210    if (l1 .ne. ichar('-')) go to 900
  722. XC See if year follows
  723. X
  724. X      k = n + 1
  725. X      l1 = line (k)
  726. X
  727. X      if (.not. numeric(l1)) go to 910
  728. XC First dash is left
  729. X      ixyr = icvtbn1(l1)
  730. X
  731. X      do (n = k + 1, 30)
  732. X
  733. X          l1 = line (n)
  734. X
  735. X          if (.not. numeric(l1)) go to 910
  736. X
  737. X          ixyr = icvt10(ixyr, l1)
  738. X
  739. X      end do
  740. X
  741. X      n = 31
  742. X
  743. X 910    longyr = ((n - k) .gt. 2)
  744. XC Set logic value
  745. X
  746. X      go to 900
  747. X
  748. X300      continue
  749. XC Short string found, fix it up
  750. X
  751. X      nfd = n/2
  752. XC Number of 2-char groups found
  753. X
  754. X      longyr = (nfd .gt. nf)
  755. XC check for default or forced century
  756. X
  757. X      if ((n .and. 1) .eq. 0) then
  758. XC Example: n = 5 for 4 chars found (0 mod 2)
  759. X          work(1) = '0'
  760. XC Force even number of characters
  761. X          do (i = 2, n)
  762. X        work(i) = line(i - 1)
  763. XC Shift line over by 1
  764. X          end do
  765. X      end if
  766. X
  767. X      go to (310, 320, 330) nf
  768. XC Dispatch on # expected fields
  769. X      go to 900
  770. XC Bad value ???
  771. X
  772. X 310    ixyr = ix
  773. XC take year: Y [yy]
  774. X      go to 900
  775. XC End case
  776. X
  777. X 320    ixmo = icvtbin(iwkk(1))
  778. XC M mm
  779. X      if (nfd .eq. 2) ixyr = icvtbin(iwkk(3))
  780. XC M {m}myy
  781. X      if (nfd .eq. 3) ixyr = mod(ix, 10000)
  782. XC M {m}myyyy
  783. X      go to 900
  784. XC End case
  785. X
  786. X 330    if (nfd .eq. 1) ixdy = icvtbin(iwkk(1))
  787. XC D {d}d {only}
  788. X
  789. X      if (nfd .ge. 2) then
  790. XC D [mm]dd[yy]
  791. X          ixmo = icvtbin(iwkk(1))
  792. XC D {m}mdd
  793. X          ixdy = icvtbin(iwkk(3))
  794. XC D {m}mdd
  795. X      end if
  796. X
  797. X      if (nfd .eq. 3) ixyr = icvtbin(iwkk(5))
  798. XC D {m}mddyy
  799. X      if (nfd .eq. 4) ixyr = mod(ix, 10000)
  800. XC D {m}mddyyyy
  801. X
  802. X 900    continue
  803. XC common clean-up & return
  804. X
  805. XC Check for 1-99 AD
  806. X      if ((ixyr .lt. 100) .and. (.not. longyr))
  807. X     1   ixyr = ixyr + ((ibigyr/100)*100)
  808. XC add "current" century
  809. X
  810. X      if (islpyr(ixyr))
  811. X     1 then
  812. X          lm(2) = 29
  813. XC Set for Leap Years
  814. X        else
  815. X          lm(2) = 28
  816. XC reset for "common" years
  817. X      end if
  818. X
  819. X      ibigyr = ixyr
  820. XC Explicit year
  821. X      idmo = min0(max0(ixmo, 1), 12)
  822. XC Limit values
  823. X      iddy = min0(max0(ixdy, 1), lm(idmo))
  824. XC ..
  825. X
  826. X      kkk = n - 1
  827. XC Change index of next char to count
  828. X
  829. X 950    idyr = mod(ibigyr, 100)
  830. XC Set value
  831. X
  832. X      if (kkk .gt. 0)
  833. X     1 call shrink (kkk, ifnb, lnb)
  834. XC Unload the stuff we used
  835. X
  836. X 999    return
  837. XC Miscellaneous exits
  838. X       end
  839. Xc -h- dtctimcvt.for       Tue Jul  8 16:08:13 1986
  840. Xc Subroutine to extract and convert time-of-day string for DTC package
  841. Xc Converts string of form hh:mm to Integer*4 between 80 and 173
  842. Xc (half-hour intervals).  If range h1:m1>h2:m2 is present, second
  843. Xc value is returned, else same as t1>t1.
  844. X
  845. Xc Special cases
  846. Xc       *       =>      {itr1}>{itr2}
  847. Xc       E or EV =>      17:00
  848. Xc       h:      =>      0h:00
  849. Xc       h:n     =>      0h:n0   (if n .ge. 3, then 3, else 0)
  850. Xc       h1>h2   =>      h1:00>h2:00
  851. X
  852. Xc If ':' or '>' is not 2nd or 3rd character, or not '*', 'E' or 'EV',
  853. Xc entire string is left untouched, and default values are returned
  854. Xc (parameters unchanged)
  855. X
  856. X      subroutine dtctimcvt (itr1, itr2)
  857. X
  858. X      include comdtc.INC
  859. X
  860. X      INTEGER*1 ll, ln1, wk(2)
  861. X      integer*2 iwk
  862. X      character*2 icwk
  863. X      equivalence(icwk,iwk)
  864. X      integer*1 iwkk
  865. X      logical first, expectmin
  866. X
  867. X      equivalence (line(1), ln1), (iwk, wk)
  868. X      equivalence(iwkk,wk(1))
  869. X      include stmtfuncsp.for
  870. X      include comdtcd.inc
  871. X      include stmtfunc.for
  872. X
  873. X      it1 = itr1
  874. XC Caller's limits
  875. X      it2 = itr2
  876. XC (formerly 8:00 AM > 5:30 PM)
  877. X
  878. X      ix = 0
  879. XC Amount to strip
  880. X      if(ln1.gt.96)ln1=ln1-32
  881. X      if (ln1 .eq. ichar('*')) then
  882. XC Check special cases first
  883. X
  884. X          ix = 1
  885. XC Defaults, dump 1 char
  886. X
  887. X      else if ((ln1 ) .eq. ichar('E')) then
  888. X
  889. X          it1 = 170
  890. XC Set eventide
  891. X          it2 = it1
  892. X
  893. X          ix = 1
  894. X          if(line(2).gt.96)line(2)=line(2)-32
  895. X          if ((line(2)) .eq. ichar('V')) ix = 2
  896. X
  897. X      else
  898. X
  899. X          i = 0
  900. XC Temp index
  901. X          first = .true.
  902. XC Helpful
  903. X
  904. X 10         if (numeric(line(i+1))) then
  905. X
  906. X        if (numeric(line(i+2))) then
  907. X            wk(1) = line(i+1)
  908. X            wk(2) = line(i+2)
  909. X            read(icwk,850)ih
  910. X850     format(BZ ,I2)
  911. X            ih=ih*10
  912. Xc            ih = icvtbin(iwkk) * 10
  913. X            i = i + 2
  914. X        else
  915. X            ih = icvtbn1(line(i+1)) * 10
  916. X            i = i + 1
  917. X        end if
  918. X
  919. X        if (line(i+1) .eq. ichar(':')) then
  920. X            i = i + 1
  921. X            if (numeric(line(i+1))) then
  922. X                im = icvtbn1(line(i+1))
  923. X                if (im .ge. 3) then
  924. X                    im = 3
  925. X                else
  926. X                    im = 0
  927. X                end if
  928. X                ih = ih + im
  929. X                i = i + 1
  930. X                if (numeric(line(i+1))) i = i + 1
  931. XC Just ignore it
  932. X            end if
  933. X            ix = i
  934. XC Accept all processed chars
  935. X        end if
  936. X
  937. X        if ((ih .ge. 10) .and. (ih .lt. 70))
  938. X     1     ih = ih + 120
  939. XC Force early AM to PM
  940. X        ih = min0(max0(ih, 80), 180)
  941. XC Normalize within limits
  942. X
  943. X        if (line(i+1) .eq. ichar('>')) then
  944. X            i = i + 1
  945. X            ix = i
  946. XC Insure it gets copied
  947. X            it2 = ih
  948. X            if (first) then
  949. X                it1 = it2
  950. X                first = .false.
  951. X                go to 10
  952. X            end if
  953. X        else if (ix .ne. 0)     then
  954. XC Got some numeric
  955. X            if (first) then
  956. X                it1 = ih
  957. XC terminated by ':'
  958. X                it2 = ih
  959. XC first time t1>t1
  960. X            else
  961. X                it2 = ih
  962. XC 2nd numeric
  963. X                ix = i
  964. XC Claim everything looked at
  965. X            end if
  966. XC Which time
  967. X        end if
  968. XC Range delimiter ('>')
  969. X          end if
  970. XC First numeric
  971. X      end if
  972. XC All others unrecognized (includes EOL)
  973. X
  974. X      itr1 = it1
  975. XC All exit here
  976. X      itr2 = max0(it2, it1)
  977. XC Make sure range OK
  978. X
  979. X      if (ix .ne. 0) call shrink (ix, ifnb, lnb)
  980. XC Unload what we've used
  981. X
  982. X      end
  983. XC -h- shrink.for  Tue Jul  8 16:08:41 1986
  984. Xc Subroutine to shift LINE to left after current item has been scanned
  985. Xc deletes blanks between that point and first non-blank character
  986. Xc Performs no operation if current item is EOL (binary 0)
  987. X
  988. Xc Sets return arguments pointing to first and last non-blank characters
  989. X
  990. X      subroutine shrink (iskip, ifnbr, lnbr)
  991. Xc
  992. X      include comdtc.INC
  993. X
  994. X      INTEGER*1 ll
  995. X      include comdtcd.inc
  996. X
  997. X      ifnb = 0
  998. X      lnb = 0
  999. X
  1000. X      if (line(1) .eq. 0) go to 999
  1001. XC Exit immediately
  1002. X
  1003. X      ix = iskip + 1
  1004. XC start looking
  1005. X      do while ((ix .le. icmln) .and. (line(ix) .ne. 0))
  1006. X      if (line(ix) .gt. 32) go to 10
  1007. XC Found something
  1008. X      ix = ix + 1
  1009. X      end do
  1010. X      line(1) = 0
  1011. XC Flag end, no copy
  1012. X      go to 999
  1013. X
  1014. X 10     ifnb = 1
  1015. X      lnb = 1
  1016. X
  1017. X      Do (i = 1, icmln-ix)
  1018. X
  1019. X          ll = line(ix)
  1020. X          line(i) = ll
  1021. X          if (ll .eq. 0) go to 999
  1022. XC Stop at EOL
  1023. X          if (ll .gt. 32) lnb = i
  1024. X          ix = ix + 1
  1025. X      end do
  1026. X      line(min0(lnb+1, icmln)) = 0
  1027. XC Flag EOL if not found
  1028. X
  1029. X 999    ifnbr = ifnb
  1030. XC Set return values
  1031. X      lnbr = lnb
  1032. X
  1033. X      end
  1034. XC -h- dtcat.for   Tue Jul  8 16:09:05 1986
  1035. X      subroutine dtcat(ic,ir)
  1036. XC x, y
  1037. Xc
  1038. X      include comdtc.INC
  1039. XC Need ITERM
  1040. X      include escdtc.INC
  1041. XC
  1042. X      include comdtcd.inc
  1043. X      include escdtcd.inc
  1044. X      write(*,773)
  1045. X773   format(' ')
  1046. Xc write once to flush extra junk out... then position.
  1047. X      write(*, 2, err=3) esc,'[',ir,';',ic,'H'
  1048. X 2      format($,2a1,i2.2,a1,i3.3,a1,$)
  1049. XC Max rows is 2-digit number
  1050. Xc
  1051. X      return
  1052. Xc
  1053. X 3      write (*,10) esc,homescrn, ir, ic
  1054. X 10     format($, 2a, 'Error in DTCAT, row/col =', 2z5.4, ' (hex).')
  1055. X      end
  1056. XC -h- gaby.for    Tue Jul  8 16:10:23 1986
  1057. Xc-----------------------------------------------------------------------
  1058. XC       Subroutine Gaby
  1059. XC       Part of Mitch Wyle's DTC program
  1060. XC       return a string corresponding to the month number
  1061. Xc       Month number contained in im.  Send back string in monthn.
  1062. Xc       (JANUARY for 1, etc.)
  1063. XC-----------------------------------------------------------------------
  1064. XC       modified 850315 - Center month names in table, use mixed case - CG
  1065. X
  1066. X      SUBROUTINE gaby(im,monthn)
  1067. X
  1068. XC       Declarations:
  1069. Xc
  1070. X      INTEGER*1 monthn(9)
  1071. XC       Table of month names and numbers (centered, even lengths biased left):
  1072. Xc
  1073. X
  1074. X      INTEGER*1 months(9,14)
  1075. X      character*9 monthch(14)
  1076. X
  1077. X      equivalence (months, monthch)
  1078. XC       Select the right month and fill monthn with it:
  1079. Xc
  1080. X      Data monthch/           'December ',
  1081. X     1 ' January ', 'February ', '  March  ', '  April  ',
  1082. X     2 '   May   ', '  June   ', '  July   ', ' August  ',
  1083. X     3 'September', ' October ', 'November ', 'December ',
  1084. X     4 ' January '/
  1085. X
  1086. X
  1087. XC ALLOW FOR OVERFLOWS...
  1088. X      IMM=IM+1
  1089. Xc ***   monthn = monthch(imm)
  1090. XC String assignment
  1091. Xc
  1092. X      Do 1 i=1,9
  1093. XC INTEGER*1-at-a-time
  1094. X          Monthn(i) = months(i,imm)
  1095. X 1      Continue
  1096. X
  1097. Xc       All done.
  1098. X
  1099. X      return
  1100. X      end
  1101. Xc -h- ICVT routines
  1102. X       Integer*2 function Icvtbin(ich2)
  1103. X       Character*2 ich2
  1104. X       Character*2 wrk
  1105. X       integer*2 iwrk,ians
  1106. X       Equivalence(wrk,iwrk)
  1107. Xc convert 2 digit Integer*4 to number
  1108. Xc avoid trick version from VAX that depends on byte
  1109. Xc ordering (which fails on MC68000).
  1110. X       wrk=ich2
  1111. X       Read(wrk,1,err=2)ians
  1112. X1      Format(BN,I2)
  1113. X2      Continue
  1114. X       Icvtbin=ians
  1115. X       Return
  1116. X       End
  1117. X       Function Icvtbn1(nnn)
  1118. X       Integer*1 nnn
  1119. X       Integer*4  kkk
  1120. X       kkk=48
  1121. X       if(nnn.ge.48.and.nnn.le.57)kkk=nnn
  1122. X       kkk=kkk-48
  1123. Xc return 0 or digit value...
  1124. X       Icvtbn1=kkk
  1125. X       Return
  1126. X       End
  1127. Xd       subroutine dely
  1128. Xd       Integer*4 idly,i1
  1129. Xd       common/xxxyyy/idly
  1130. Xd       idly=0
  1131. Xd       do 1 i1=1,15000
  1132. Xd       idly=idly+i1
  1133. Xd1      continue
  1134. Xd       idly=idly/100
  1135. Xd       return
  1136. Xd       end
  1137. X
  1138. X
  1139. END_OF_FILE
  1140. if test 21276 -ne `wc -c <'Dtc2.For.ac'`; then
  1141.     echo shar: \"'Dtc2.For.ac'\" unpacked with wrong size!
  1142. fi
  1143. # end of 'Dtc2.For.ac'
  1144. fi
  1145. if test -f 'appdtc.inc' -a "${1}" != "-c" ; then 
  1146.   echo shar: Will not clobber existing file \"'appdtc.inc'\"
  1147. else
  1148. echo shar: Extracting \"'appdtc.inc'\" \(558 characters\)
  1149. sed "s/^X//" >'appdtc.inc' <<'END_OF_FILE'
  1150. Xc Begin common APPTDTC.INC
  1151. X
  1152. X      parameter (iwrkln = 100)
  1153. XC Can't use it below
  1154. X      character*100 workstr
  1155. X      character*84 apptstr
  1156. XC icmln
  1157. X
  1158. XC Range of hash values (input)
  1159. X      integer*4 irqhash(2),
  1160. X     1 irchash, ihy, ihm, ihd, iht, iaptln, istart, iwkln
  1161. XC outputs
  1162. X
  1163. X      INTEGER*1 appoin(icmln), work(iwrkln)
  1164. X
  1165. X      common /apptdtc/ irqhash, irchash, ihy, ihm, ihd, iht,
  1166. X     1           iaptln, istart, iwkln, workstr, apptstr
  1167. X
  1168. X      equivalence (apptstr, appoin), (workstr, work)
  1169. X
  1170. Xc End common APPTDTC.INC
  1171. XC -h- comdtc.inc  Tue Jul  8 16:16:24 1986
  1172. END_OF_FILE
  1173. if test 558 -ne `wc -c <'appdtc.inc'`; then
  1174.     echo shar: \"'appdtc.inc'\" unpacked with wrong size!
  1175. fi
  1176. # end of 'appdtc.inc'
  1177. fi
  1178. if test -f 'apptdtc.inc' -a "${1}" != "-c" ; then 
  1179.   echo shar: Will not clobber existing file \"'apptdtc.inc'\"
  1180. else
  1181. echo shar: Extracting \"'apptdtc.inc'\" \(558 characters\)
  1182. sed "s/^X//" >'apptdtc.inc' <<'END_OF_FILE'
  1183. Xc Begin common APPTDTC.INC
  1184. X
  1185. X      parameter (iwrkln = 100)
  1186. XC Can't use it below
  1187. X      character*100 workstr
  1188. X      character*84 apptstr
  1189. XC icmln
  1190. X
  1191. XC Range of hash values (input)
  1192. X      integer*4 irqhash(2),
  1193. X     1 irchash, ihy, ihm, ihd, iht, iaptln, istart, iwkln
  1194. XC outputs
  1195. X
  1196. X      INTEGER*1 appoin(icmln), work(iwrkln)
  1197. X
  1198. X      common /apptdtc/ irqhash, irchash, ihy, ihm, ihd, iht,
  1199. X     1           iaptln, istart, iwkln, workstr, apptstr
  1200. X
  1201. X      equivalence (apptstr, appoin), (workstr, work)
  1202. X
  1203. Xc End common APPTDTC.INC
  1204. XC -h- comdtc.inc  Tue Jul  8 16:16:24 1986
  1205. END_OF_FILE
  1206. if test 558 -ne `wc -c <'apptdtc.inc'`; then
  1207.     echo shar: \"'apptdtc.inc'\" unpacked with wrong size!
  1208. fi
  1209. # end of 'apptdtc.inc'
  1210. fi
  1211. if test -f 'comdtc.inc' -a "${1}" != "-c" ; then 
  1212.   echo shar: Will not clobber existing file \"'comdtc.inc'\"
  1213. else
  1214. echo shar: Extracting \"'comdtc.inc'\" \(1020 characters\)
  1215. sed "s/^X//" >'comdtc.inc' <<'END_OF_FILE'
  1216. Xc Common file COMDTC.INC for Desk Top Calendar programs
  1217. Xc
  1218. X      parameter (iterm = 7)
  1219. XC Terminal unit number
  1220. Xc
  1221. XC Length of character buffers
  1222. X      parameter (icmln = 84)
  1223. X      PARAMETER (iaptlim = 68)
  1224. XC maximum displayed length
  1225. Xc
  1226. X      Integer*4 comlen, comidx
  1227. XC Current info
  1228. X      INTEGER*1 line(icmln)
  1229. XC command line
  1230. X      common /cmdlin/ comlen, comidx, line
  1231. Xc
  1232. X      Integer*4 tokstart, toklen, tokfidx
  1233. XC Command-line scanning info
  1234. X      INTEGER*1 tokfound
  1235. XC for multi-token scans
  1236. X      common /cmdscan/ tokstart, toklen, tokfidx, tokfound
  1237. Xc
  1238. X      Integer*4 rdspfg
  1239. XC  flag to reverse sense of display of time
  1240. X      Integer*4 ctlfg
  1241. XC  misc control flags here
  1242. X      common /ctls/ rdspfg, ctlfg
  1243. Xc
  1244. X      Integer*4 idyr, idmo, iddy, incmod, ibigyr
  1245. X      common /defdat/ idyr, idmo, iddy, incmod, ibigyr
  1246. Xc
  1247. X      Integer*4 fnsz
  1248. XC Size of filename
  1249. X      INTEGER*1 fname(60)
  1250. X      Character*60 fnc
  1251. Xc
  1252. X      common /fn/ fnsz, fname
  1253. X      Equivalence(fnc,fname(1))
  1254. Xc
  1255. X      INTEGER*1 ucmask
  1256. XC Useful constant
  1257. XC End of COMDTC.INC
  1258. X
  1259. END_OF_FILE
  1260. if test 1020 -ne `wc -c <'comdtc.inc'`; then
  1261.     echo shar: \"'comdtc.inc'\" unpacked with wrong size!
  1262. fi
  1263. # end of 'comdtc.inc'
  1264. fi
  1265. if test -f 'comdtcd.inc' -a "${1}" != "-c" ; then 
  1266.   echo shar: Will not clobber existing file \"'comdtcd.inc'\"
  1267. else
  1268. echo shar: Extracting \"'comdtcd.inc'\" \(121 characters\)
  1269. sed "s/^X//" >'comdtcd.inc' <<'END_OF_FILE'
  1270. Xc Common file COMDTCd.INC for Desk Top Calendar programs
  1271. Xc
  1272. X      Data ucmask/95/
  1273. XC Useful constant
  1274. XC End of COMDTCD.INC
  1275. X
  1276. END_OF_FILE
  1277. if test 121 -ne `wc -c <'comdtcd.inc'`; then
  1278.     echo shar: \"'comdtcd.inc'\" unpacked with wrong size!
  1279. fi
  1280. # end of 'comdtcd.inc'
  1281. fi
  1282. if test -f 'dtc.hlp' -a "${1}" != "-c" ; then 
  1283.   echo shar: Will not clobber existing file \"'dtc.hlp'\"
  1284. else
  1285. echo shar: Extracting \"'dtc.hlp'\" \(1781 characters\)
  1286. sed "s/^X//" >'dtc.hlp' <<'END_OF_FILE'
  1287. X    The DTC program provides an on-line appointment scheduler and calendar     
  1288. Xfacility. The program has three display commands, D/W/M for Day-/Week-/      
  1289. XMonth-At-A-Glance, plus alternate-display and schedule-file maintenance          
  1290. Xcommands. It is invoked by:                                                      
  1291. X    DTC [[command] [date]].                                                     
  1292. X    If no command is given, the DTC command menu is displayed. Commands are     
  1293. Xthen requested and processed until the user types Q (quit), EX (exit), or ^Z.   
  1294. X    The date format is mmddyy for Day and Week, and mmyy for the month part.     
  1295. XThe command "D 052785" displays appointments for May 27, 1985. The command:     
  1296. X"9:00 <appointment string>" would insert the appointment specified by          
  1297. X"appointment string" at 9 AM on the default date. The default date is the last 
  1298. Xdate given unless the I command is used to reset to today's date. Dates may be  
  1299. Xgiven as mmddyy, mm/dd/yy, or dd-mmm-yy, or reasonable subsets (i.e, "D 5"      
  1300. Xshows appointments for the fifth of the current month, "M 7/86" is July 1986).  
  1301. XTime entries of the form hh:mm>hh:mm specify ranges. A CLI command to enter an  
  1302. Xappointment might be (quote is used to preserve lower-case, no final quote):   
  1303. X     1>DTC "D 041585 9:00 Income Tax due tonight                                  
  1304. XIndirection:                                                                     
  1305. X    Entries in the DTC file of form "999999080 dir/filename.typ=" point at the   
  1306. Xfilename and the S or G cmds enter appts. in them, other cmds read them. Use   
  1307. Xthe F cmd to change files. DTC commands T, C, and R correspond to D, M, and W   
  1308. Xbut exit after one display. More info in DTC.MEM.                               
  1309. END_OF_FILE
  1310. if test 1781 -ne `wc -c <'dtc.hlp'`; then
  1311.     echo shar: \"'dtc.hlp'\" unpacked with wrong size!
  1312. fi
  1313. # end of 'dtc.hlp'
  1314. fi
  1315. if test -f 'dtcmak.cmd' -a "${1}" != "-c" ; then 
  1316.   echo shar: Will not clobber existing file \"'dtcmak.cmd'\"
  1317. else
  1318. echo shar: Extracting \"'dtcmak.cmd'\" \(88 characters\)
  1319. sed "s/^X//" >'dtcmak.cmd' <<'END_OF_FILE'
  1320. Xecho build for DTC
  1321. XF77 -K DTC.For
  1322. XF77L -o Dtc.Exe -l l:f77.rl dtc l:date.sub l:time.sub
  1323. END_OF_FILE
  1324. if test 88 -ne `wc -c <'dtcmak.cmd'`; then
  1325.     echo shar: \"'dtcmak.cmd'\" unpacked with wrong size!
  1326. fi
  1327. # end of 'dtcmak.cmd'
  1328. fi
  1329. if test -f 'dtcrelnt.txt' -a "${1}" != "-c" ; then 
  1330.   echo shar: Will not clobber existing file \"'dtcrelnt.txt'\"
  1331. else
  1332. echo shar: Extracting \"'dtcrelnt.txt'\" \(678 characters\)
  1333. sed "s/^X//" >'dtcrelnt.txt' <<'END_OF_FILE'
  1334. XDeskTop Calendar - release notes
  1335. X
  1336. XThis version of DTC runs correctly under AmigaDos 1.2 with interlace
  1337. Xon. Some extra stack may be required but in general will not be as the
  1338. Xnumber of COMMONs is small.
  1339. X    It is believed to run OK in non-interlace systems also. In this
  1340. Xversion the year display CAN be used, but only if you reset the default
  1341. Xfont to a 5 by 7 font (e.g. the "smallfont" font I have distributed in
  1342. Xthe public domain). This permits 128-wide screens, which the year
  1343. Xdisplay needs. Everything else only needs at most 80 chars.
  1344. X    Most glitches in display are fixed and all source code is here
  1345. Xfor your use, so the program is a useful calendar system now.
  1346. X    Glenn Everhart
  1347. END_OF_FILE
  1348. if test 678 -ne `wc -c <'dtcrelnt.txt'`; then
  1349.     echo shar: \"'dtcrelnt.txt'\" unpacked with wrong size!
  1350. fi
  1351. # end of 'dtcrelnt.txt'
  1352. fi
  1353. if test -f 'dtcxidate.inc' -a "${1}" != "-c" ; then 
  1354.   echo shar: Will not clobber existing file \"'dtcxidate.inc'\"
  1355. else
  1356. echo shar: Extracting \"'dtcxidate.inc'\" \(216 characters\)
  1357. sed "s/^X//" >'dtcxidate.inc' <<'END_OF_FILE'
  1358. Xc *** Common file DTCXIDTATE for dummy IDATE subroutine of DTC program
  1359. X
  1360. X      integer*4 xim, xid, xiy, xibgyr
  1361. XC Month, day, year (yy), year (yyyy)
  1362. X      common /xidate/ xim, xid, xiy, xibgyr
  1363. X
  1364. Xc *** End DTCXIDATE.INC
  1365. END_OF_FILE
  1366. if test 216 -ne `wc -c <'dtcxidate.inc'`; then
  1367.     echo shar: \"'dtcxidate.inc'\" unpacked with wrong size!
  1368. fi
  1369. # end of 'dtcxidate.inc'
  1370. fi
  1371. if test -f 'escdtc.inc' -a "${1}" != "-c" ; then 
  1372.   echo shar: Will not clobber existing file \"'escdtc.inc'\"
  1373. else
  1374. echo shar: Extracting \"'escdtc.inc'\" \(535 characters\)
  1375. sed "s/^X//" >'escdtc.inc' <<'END_OF_FILE'
  1376. Xc Common file ESCDTC.INC for Desk Top Calendar programs
  1377. Xc
  1378. XC Special sequences
  1379. X      character*2 homescrn, clrscrn,
  1380. X     1      dhdw1, dhdw2, dwide, resetvattr
  1381. X      character*3 revattr
  1382. XC Greasy?
  1383. X      common /vidstuff/ homescrn, clrscrn,
  1384. X     1 dhdw1, dhdw2, dwide, resetvattr, revattr
  1385. XC Compiler will usually treat these as constants, so don't really need them
  1386. Xc to be in common
  1387. Xc
  1388. XC ASCII escape
  1389. XC ^N, Shift-Out (enter graphics mode w/ ')0')
  1390. X       Integer*1 esc,so,si
  1391. XC ^O, Shift-In (exit graphics mode w/ '(B')
  1392. XC End of ESCDTC.INC
  1393. X
  1394. END_OF_FILE
  1395. if test 535 -ne `wc -c <'escdtc.inc'`; then
  1396.     echo shar: \"'escdtc.inc'\" unpacked with wrong size!
  1397. fi
  1398. # end of 'escdtc.inc'
  1399. fi
  1400. if test -f 'escdtcd.inc' -a "${1}" != "-c" ; then 
  1401.   echo shar: Will not clobber existing file \"'escdtcd.inc'\"
  1402. else
  1403. echo shar: Extracting \"'escdtcd.inc'\" \(178 characters\)
  1404. sed "s/^X//" >'escdtcd.inc' <<'END_OF_FILE'
  1405. Xc Common file ESCDTCD.INC for Desk Top Calendar programs
  1406. Xc
  1407. XC Special sequences
  1408. X       Data esc/27/,so/14/,si/15/
  1409. XC ^O, Shift-In (exit graphics mode w/ '(B')
  1410. XC End of ESCDTC.INC
  1411. X
  1412. END_OF_FILE
  1413. if test 178 -ne `wc -c <'escdtcd.inc'`; then
  1414.     echo shar: \"'escdtcd.inc'\" unpacked with wrong size!
  1415. fi
  1416. # end of 'escdtcd.inc'
  1417. fi
  1418. if test -f 'stmtfunc.for' -a "${1}" != "-c" ; then 
  1419.   echo shar: Will not clobber existing file \"'stmtfunc.for'\"
  1420. else
  1421. echo shar: Extracting \"'stmtfunc.for'\" \(1129 characters\)
  1422. sed "s/^X//" >'stmtfunc.for' <<'END_OF_FILE'
  1423. Xc Useful statement functions:
  1424. Xc   1) type checking of single character
  1425. Xc   2) quick binary to 2-digit bcd conversion, and vice versa
  1426. Xc   3) Check for leap-year (Gregorian)
  1427. Xc   4) Hashdate for DTC appointment matching
  1428. Xc
  1429. Xc ! Character type checking
  1430. X      numeric(ch) = (ch .GE. 48) .AND. (ch .LE.57)
  1431. X      chnumeric(chch) = (chch .GE. '0') .AND. (chch .LE. '9')
  1432. X      lcalpha(ch) = (ch .GE.97) .AND. (ch .LE.122)
  1433. X      alpha(ch)=((ch.ge.65.and.ch.le.90).or.(ch.ge.97.and.ch.le.122))
  1434. Xc      alpha(ch) = ((ch .AND. Z'5f5f5f5f') .GE.65)
  1435. Xc     1     .AND. ((ch .AND. Z'5f5f5f5f') .LE. 90)
  1436. Xc
  1437. Xc Icvtbcd now unused
  1438. Xc Icvtbin replaced by real function in dtc.for
  1439. Xc
  1440. Xc      icvtbcd(inum) = ((MOD(inum, 10) * 256) .OR. inum/10) .OR. '00'
  1441. Xc      icvtbin(ich2) = ((ich2 .AND. Z'000F') * 10)
  1442. Xc     1         + ((ich2 .AND. Z'0F00')/256)
  1443. Xc ! Works w/space as first char
  1444. Xc      icvtbn1(ch) = ch .AND. Z'0F'
  1445. Xc ! Convert single character
  1446. Xc
  1447. X      islpyr(izyr) = (mod(izyr, 400) .EQ. 0) .OR.
  1448. X     1 ((izyr .AND. 3) .EQ. 0) .AND. (mod(izyr, 100) .NE. 0)
  1449. Xc
  1450. X      ihymd(izyr, izmo, izdy) = (((izyr * 16) + izmo) * 32) + izdy
  1451. Xc
  1452. Xc End statement functions
  1453. X
  1454. END_OF_FILE
  1455. if test 1129 -ne `wc -c <'stmtfunc.for'`; then
  1456.     echo shar: \"'stmtfunc.for'\" unpacked with wrong size!
  1457. fi
  1458. # end of 'stmtfunc.for'
  1459. fi
  1460. if test -f 'stmtfuncsp.for' -a "${1}" != "-c" ; then 
  1461.   echo shar: Will not clobber existing file \"'stmtfuncsp.for'\"
  1462. else
  1463. echo shar: Extracting \"'stmtfuncsp.for'\" \(682 characters\)
  1464. sed "s/^X//" >'stmtfuncsp.for' <<'END_OF_FILE'
  1465. Xc Useful statement functions:
  1466. Xc   1) type checking of single character
  1467. Xc   2) quick binary to 2-digit bcd conversion, and vice versa
  1468. Xc   3) Check for leap-year (Gregorian)
  1469. Xc   4) Hashdate for DTC appointment matching
  1470. Xc
  1471. Xc specification stmts
  1472. Xc ! Character type checking
  1473. X      logical numeric, chnumeric,      
  1474. X     1   lcalpha, alpha,
  1475. X     2   islpyr            
  1476. Xc ! value check
  1477. X      integer*1 ch
  1478. Xc ! Single argument
  1479. X      character*1 chch
  1480. Xc      integer*2  ich2         
  1481. Xc ! Conversion routines
  1482. Xc ! Compilation default
  1483. Xc      integer*2  icvtbn1, inum, ihymd,   
  1484. X      integer*4   inum, ihymd,   
  1485. X     1  izyr, izmo, izdy         
  1486. Xc ! ..
  1487. Xc
  1488. Xc End statement functions specifications
  1489. X
  1490. END_OF_FILE
  1491. if test 682 -ne `wc -c <'stmtfuncsp.for'`; then
  1492.     echo shar: \"'stmtfuncsp.for'\" unpacked with wrong size!
  1493. fi
  1494. # end of 'stmtfuncsp.for'
  1495. fi
  1496. echo shar: End of archive 1 \(of 6\).
  1497. cp /dev/null ark1isdone
  1498. MISSING=""
  1499. for I in 1 2 3 4 5 6 ; do
  1500.     if test ! -f ark${I}isdone ; then
  1501.     MISSING="${MISSING} ${I}"
  1502.     fi
  1503. done
  1504. if test "${MISSING}" = "" ; then
  1505.     echo You have unpacked all 6 archives.
  1506.     rm -f ark[1-9]isdone
  1507. else
  1508.     echo You still need to unpack the following archives:
  1509.     echo "        " ${MISSING}
  1510. fi
  1511. ##  End of shell archive.
  1512. exit 0
  1513. -- 
  1514. Mail submissions (sources or binaries) to <amiga@cs.odu.edu>.
  1515. Mail comments to the moderator at <amiga-request@cs.odu.edu>.
  1516. Post requests for sources, and general discussion to comp.sys.amiga.
  1517.